module.exports = {
  mode: 'spa',
  /*
  ** Headers of the page
  */
  head: {
    title: '游戏分享',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no' },
      { hid: 'description', name: 'description', content: 'Nuxt.js project' }
    ],
    link: [
    ]
  },
  /*
  ** Customize the progress bar color
  */
  loading: { color: '#3B8070' },
  /*
  ** css configuration
  */
  css: [
    'normalize.css',
    '~/assets/css/index.scss'
  ],
  modules: [
    '@nuxtjs/axios'
  ],
  axios: {
    baseURL: process.env.SITE_ENV === 'dev' ? 'http://127.0.0.1:3000"/' : 'http://121.196.212.10:3000/'
  },
  /*
  ** plugins configuration
  */
  plugins: [
    {
      src: '~/plugins/element',
      ssr: true
    },
    {
      src: '~/plugins/mock',
      ssr: true
    },
    {
      src: '~/plugins/base',
      ssr: true
    },

    {
      src: '~/plugins/myvalidate',
      ssr: true
    },
    // {
    // src: '~/plugins/axios',
    // ssr: true
    // },
    {
      src: '~/plugins/swiper',
      ssr: true
    },
    {
      src: '~/plugins/particles',
      ssr: true
    }
  ],
  /*
  ** vendor configuration
  */
  vendor: [
    'axios',
    'element-ui',
    'mockjs'
  ],

  /*
  ** Build configuration
  */
  build: {
    /*
    ** Run ESLint on save
    */
    extend (config, { isDev, isClient }) {
      if (isDev && isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
      }
    }
  },
  router: {
    middleware: ['stats', 'test']
  }
}

